```svelte {3,7,13}

<script lang="ts">
  // initial focused element ref
  let inputRef: HTMLInputElement | null = null

  const service = useMachine(popover.machine, {
    initialFocusEl: () => inputRef,
  })
  // ...
</script>

<!-- ... -->
<input bind:this={inputRef} />
<!-- ... -->
```
